package com.question.entity;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class Question {
	
	 private Integer id;
	 private String question_title;
	 private String question_info;
	 private Date create_datetime;
	 private Integer credit;
	 private Integer open_state;
	 private Integer question_state_id;
	 private User  user;
	 public final static Map<String, Integer> map = new HashMap<>();
	 /**
	  * 未解决
	  */
	 public final static Integer QUESTION_STATE_TYPE1 = 1;
	 /**
	  * 已解决
	  */
	 public final static Integer QUESTION_STATE_TYPE2 = 2;
	 /**
	  * 开放
	  */
	 public final static Integer OPEN_STATE_TYPE1 = 0;
	 /**
	  * 关闭
	  */
	public final static Integer OPEN_STATE_TYPE2 = 1;
	static {
		map.put("all", 0);
		map.put("solve", QUESTION_STATE_TYPE2);
		map.put("unsolved",QUESTION_STATE_TYPE1);
	}
	
	public Question(Integer id, String question_info, Date create_datetime, Integer credit, Integer open_state,
			Integer question_state_id, User user,String question_title) {
		super();
		this.id = id;
		this.question_info = question_info;
		this.create_datetime = create_datetime;
		this.credit = credit;
		this.open_state = open_state;
		this.question_state_id = question_state_id;
		this.user = user;
		this.question_title = question_title;
	}
	public Question() {
		super();
	}
	public String getQuestion_title() {
		return question_title;
	}
	public void setQuestion_title(String question_title) {
		this.question_title = question_title;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getQuestion_info() {
		return question_info;
	}
	public void setQuestion_info(String question_info) {
		this.question_info = question_info;
	}
	public Date getCreate_datetime() {
		return create_datetime;
	}
	public void setCreate_datetime(Date create_datetime) {
		this.create_datetime = create_datetime;
	}
	public Integer getCredit() {
		return credit;
	}
	public void setCredit(Integer credit) {
		this.credit = credit;
	}
	public Integer getOpen_state() {
		return open_state;
	}
	public void setOpen_state(Integer open_state) {
		this.open_state = open_state;
	}
	public Integer getQuestion_state_id() {
		return question_state_id;
	}
	public void setQuestion_state_id(Integer question_state_id) {
		this.question_state_id = question_state_id;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}

}
